using System;
using System.Linq.Expressions;
using RomanJendrusz.Amazon.ETL.Domain;
using RomanJendrusz.Amazon.ETL.Infrastructure.DataBase;

namespace RomanJendrusz.Amazon.ETL.Repositories
{
    public interface ISession
    {
        IQuerySource<Customer> Customers { get; } 

        IQuerySource<Book> Books { get; }

        IQuerySource<CustomerReview> CustomersReviews { get; }

        IQuerySource<ListMania> ListManias { get; }

        IQuerySource<WishList> Wishlists { get; }

        IQuerySource<Seller> Sellers { get; }

        IQuerySource<SellerFeedback> SellerFeedbacks { get; }

        IQuerySource<SellerOffer> SellerOffers { get; }

        IQuerySource<SimiliarBook> SimiliarBooks { get; }

        IQuerySource<Author> Authors{ get; }

        IQuerySource<BookAuthors> BookAuthors{ get; }
        
        IQuerySource<BrowseNode> BrowsNodes { get; }
        IQuerySource<BrowseNodesBook> BrowsNodesBooks { get; }

        IQuerySource<T> GetQuerySource<T>() where T: class ;

        void Fetch<T>(Expression<Func<T, Object>> fetchObject);

        void SubmitChanges();

        void RemoveFetchOptions();
        bool Has<TEntity>(TEntity item) where TEntity:class;
    }
}